**************************************************
********IMF: International Migration Fund*********
*************ANGIN, SHEHAJ, and SHIN**************
******************Dec 2, 2022*********************
**************************************************

**Analysis run using Stata16
version 16

**CHANGE/SET WORKING DIRECTORY
cd "/Users/Adrian/Box Sync/Colorado/Under Pressure/IMF Replication Package"
use "Main Data.dta", clear
set matsize 800


**Table 1: G5 Migration and IMF Loan Size
reg f.loansizelog c.g5composite_pop_1000##c.growth polity  logpop loggdp  i.year i.ccode, cluster(ccode)
estimates store MODEL1, title(Model 1)
margins, dydx(g5composite_pop_1000) at(growth=(-20(5)20))
reg f.loansizelog c.g5composite_pop_1000##c.growth polity  logpop loggdp logg5imports logg5exports g5alliance i.year i.ccode, cluster(ccode)
estimates store MODEL2, title(Model 2)
margins, dydx(g5composite_pop_1000) at(growth=(-20(5)20))
marginsplot, xsize(10) ysize(9) addplot(hist growth if growth<20 & growth>-20 & loansizelog!=. & loansizelog!=., yaxis(2) xscale(range(-20(5)20)) xlabel(-20(5)20, labsize(4)) ylabel(, labsize(4)) yscale(range(-1(1)3)) ylabel(-1(1)3, labsize(4))  yscale(axis(2) range(0 .15) off) lc(white%0) fcolor(gs10%30) recast(bar)) recast(line) recastci(rarea) ciopts(fc(emidblue%30) lc(white%0)) yline(0) xtitle(Annual GDP Growth Rate (%), size(5)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))
**Fig 1A
graph export "me_model2.pdf", replace
reg f.loansizelog c.g5composite_pop_1000##c.growth polity  logpop loggdp logg5imports logg5exports g5alliance logusbankexp  i.year i.ccode, cluster(ccode)
estimates store MODEL3, title(Model 3)
margins, dydx(g5composite_pop_1000) at(growth=(-20(5)20)) noestimcheck
marginsplot, xsize(10) ysize(9) addplot(hist growth if growth<20 & growth>-20 & loansizelog!=., yaxis(2) xscale(range(-20(5)20)) xlabel(-20(5)20, labsize(4)) ylabel(, labsize(4)) yscale(range(-1(1)3)) ylabel(-1(1)3, labsize(4))  yscale(axis(2) range(0 .15) off) lc(white%0) fcolor(gs10%30) recast(bar)) recast(line) recastci(rarea) ciopts(fc(emidblue%30) lc(white%0)) yline(0) xtitle(Annual GDP Growth Rate (%), size(5)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))
**Fig 1B
graph export "me_model3.pdf", replace
reg f.loansizelog c.g5composite_pop_1000##c.growth polity  logpop loggdp logg5imports logg5exports g5alliance logg5aid i.year i.ccode, cluster(ccode)
estimates store MODEL4, title(Model 4)
margins, dydx(g5composite_pop_1000) at(growth=(-20(5)20))
marginsplot, xsize(10) ysize(9) addplot(hist growth if growth<20 & growth>-20 & loansizelog!=., yaxis(2) xscale(range(-20(5)20)) xlabel(-20(5)20, labsize(4)) ylabel(, labsize(4)) yscale(range(-1(1)3)) ylabel(-1(1)3, labsize(4))  yscale(axis(2) range(0 .15) off) lc(white%0) fcolor(gs10%30) recast(bar)) recast(line) recastci(rarea) ciopts(fc(emidblue%30) lc(white%0)) yline(0) xtitle(Annual GDP Growth Rate (%), size(5)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))
**Fig 2A
graph export "me_model4.pdf", replace
reg f.loansizelog c.g5composite_pop_1000##c.growth polity  logpop loggdp logg5imports logg5exports g5alliance logremit i.year i.ccode, cluster(ccode)
estimates store MODEL5, title(Model 5)
margins, dydx(g5composite_pop_1000) at(growth=(-20(5)20))
marginsplot, xsize(10) ysize(9) addplot(hist growth if growth<20 & growth>-20 & loansizelog!=., yaxis(2) xscale(range(-20(5)20)) xlabel(-20(5)20, labsize(4)) ylabel(, labsize(4)) yscale(range(-1(1)3)) ylabel(-1(1)3, labsize(4))  yscale(axis(2) range(0 .15) off) lc(white%0) fcolor(gs10%30) recast(bar)) recast(line) recastci(rarea) ciopts(fc(emidblue%30) lc(white%0)) yline(0) xtitle(Annual GDP Growth Rate (%), size(5)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))
**Fig 2A
graph export "me_model5.pdf", replace
estout MODEL1 MODEL2 MODEL3 MODEL4 MODEL5, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "table1.tex", replace style(tex)


**Table 3: G5 Migration and IMF Conditionality
nbreg f1.conditionsnum c.g5composite_pop_1000 growth logpop loggdp polity logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODEL6, title((6))
nbreg f1.hard c.g5composite_pop_1000 c.growth logpop loggdp polity logg5imports logg5exports g5alliance year i.period  i.ccode, vce(cluster ccode) noconstant
estimates store MODEL7, title((7))
nbreg f1.soft c.g5composite_pop_1000 growth logpop loggdp polity logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODEL8, title((8))
nbreg f1.qpc c.g5composite_pop_1000 c.growth logpop loggdp  polity  logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODEL9, title((9))
nbreg f1.spc c.g5composite_pop_1000 c.growth logpop loggdp polity  logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODEL10, title((10))
estout MODEL6 MODEL7 MODEL8 MODEL9 MODEL10, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "table3.tex", replace style(tex) 


*****************************
*********APPENDIX************
*****************************

**Table A1: Summary Statistics
sutex loansizelog g5composite_pop_1000  g2composite_pop_1000  g3composite_pop_1000 growth polity logpop loggdp logg5imports logg5exports g5alliance logusbankexp logg5aid logremit g5elec g5compositerwp g5compositeright g5compositeleft if loansizelog!=., minmax
sutex conditionsnum hard soft qpc spc labor fiscal debt poverty social waiver, minmax
sutex tot_rate low_rate med_rate high_rate if loansizelog!=., minmax

gen f1_loansizelog=f1.loansizelog
gen f1_conditionsnum=f1.conditionsnum
gen f1_hard=f1.hard
gen f1_soft=f1.soft
gen f1_qpc=f1.qpc
gen f1_spc=f1.spc
gen f1_labor=f1.labor
gen f1_fiscal=f1.fiscal
gen f1_debt=f1.debt
gen f1_poverty=f1.poverty
gen f1_social=f1.social
gen f1_waiver=f1.waiver
gen f1_tot_rate=f1.tot_rate
gen f1_low_rate=f1.low_rate
gen f1_med_rate=f1.med_rate
gen f1_high_rate=f1.high_rate
gen f2_tot_rate=f2.tot_rate
gen f2_low_rate=f2.low_rate
gen f2_med_rate=f2.med_rate
gen f2_high_rate=f2.high_rate
gen forex_gdp=forex/gdp


**Table A2: G2 & G3 Migrations and IMF Loan Size
reg f.loansizelog c.g2composite_pop_1000##c.growth polity  logpop loggdp logg5imports logg5exports g5alliance i.year i.ccode, cluster(ccode)
estimates store MODELA1, title ((A1))
reg f.loansizelog c.g3composite_pop_1000##c.growth polity  logpop loggdp logg5imports logg5exports g5alliance i.year i.ccode, cluster(ccode)
estimates store MODELA2, title ((A2))
estout MODELA1 MODELA2, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "tablea2.tex", replace style(tex)


**Table A3: G5 Migration and IMF Loan Size with Empirical Extensions
reg f.loansizelog c.g5composite_pop_1000##c.growth c.growth#c.g5elec c.g5composite_pop_1000#c.g5elec c.g5composite_pop_1000#c.g5elec#c.growth polity  logpop loggdp logg5imports logg5exports g5alliance i.year i.ccode, cluster(ccode)
estimates store MODELA3, title ((A3))
reg f.loansizelog c.g5composite_pop_1000##c.growth c.growth#c.g5compositerwp c.g5composite_pop_1000#c.g5compositerwp c.g5composite_pop_1000#c.g5compositerwp#c.growth  polity  logpop loggdp logg5imports logg5exports g5alliance i.year i.ccode, cluster(ccode)
estimates store MODELA4, title ((A4))
estout MODELA3 MODELA4, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "tablea3.tex", replace style(tex)


**Table A4: G5 Migration and IMF Loan Size Empirical Extensions
reg f.loansizelog c.g5composite_pop_1000##c.growth c.growth#c.g5compositeright c.g5composite_pop_1000#c.g5compositeright c.g5composite_pop_1000#c.g5compositeright#c.growth  polity  logpop loggdp logg5imports logg5exports g5alliance i.year i.ccode, cluster(ccode)
estimates store MODELA5, title ((A5))
reg f.loansizelog c.g5composite_pop_1000##c.growth c.growth#c.g5compositeleft c.g5composite_pop_1000#c.g5compositeleft c.g5composite_pop_1000#c.g5compositeleft#c.growth  polity  logpop loggdp logg5imports logg5exports g5alliance i.year i.ccode, cluster(ccode)
estimates store MODELA6, title ((A6))
estout MODELA5 MODELA6, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "tablea4.tex", replace style(tex)

**Figure A1
margins, dydx(g5composite_pop_1000) at(growth=(-20(5)20) g5compositeleft=(2.142803)) noestimcheck
marginsplot, xsize(10) ysize(9) addplot(hist growth if growth<20 & growth>-20 & loansizelog!=., yaxis(2) xscale(range(-20(5)20)) xlabel(-20(5)20, labsize(4)) ylabel(, labsize(4)) yscale(range(-1(1)3)) ylabel(-1(1)3, labsize(4))  yscale(axis(2) range(0 .15) off) lc(white%0) fcolor(gs10%30) recast(bar)) recast(line) recastci(rarea) ciopts(fc(emidblue%30) lc(white%0)) yline(0) xtitle(Annual GDP Growth Rate (%), size(5)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))
graph export "me_model_left1.pdf", replace

margins, dydx(g5composite_pop_1000) at(growth=(-20(5)20) g5compositeleft=(11.012437)) noestimcheck
marginsplot, xsize(10) ysize(9) addplot(hist growth if growth<20 & growth>-20 & loansizelog!=., yaxis(2) xscale(range(-20(5)20)) xlabel(-20(5)20, labsize(4)) ylabel(, labsize(4)) yscale(range(-1(1)3)) ylabel(-1(1)3, labsize(4))  yscale(axis(2) range(0 .15) off) lc(white%0) fcolor(gs10%30) recast(bar)) recast(line) recastci(rarea) ciopts(fc(emidblue%30) lc(white%0)) yline(0) xtitle(Annual GDP Growth Rate (%), size(5)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))
graph export "me_model_left2.pdf", replace

**Figure A2: Global Attitudes toward Immigration (%), 2015
use "Global Mig Attitudes 2015.dta", clear
graph hbar increased presentlevel decreased, over(region, label(labsize(medium)) gap(*1.5)) yscale(off) blabel(group, position(inside) size(vsmall)) intensity(*.9) stack blabel(bar, format(%4.0f)) ylabel(, angle(horizontal) nogrid) legend(region(lcolor(white)) rows(1) size(medium) order(1 "Increase " 2 "Keep at Present Level " 3 "Decrease")) plotregion(fcolor(white)  lcolor(white)  lstyle(none)) plotregion(fcolor(white) lstyle(none) lcolor(white)) graphregion(fcolor(white) lstyle(none) lcolor(white)) 
graph export "figa2.pdf" , replace


**Figure A3: US Public Opinion on Immigration (%), 2001-2020
use "Gallup US Migration.dta", clear
graph bar total_satisfied total_dissatisfied, over( year, label(labsize(small))) intensity(*.8) ylabel(, angle(horizontal) nogrid)  legend(region(lcolor(white)) cols(1) size(large) order(1 "Total of Very Satisfied and Somewhat Satisfied " 2 "Total of Very Dissatisfied and Somewhat Dissatisfied ")) plotregion(fcolor(white)  lcolor(white)  lstyle(none)) plotregion(fcolor(white) lstyle(none) lcolor(white)) graphregion(fcolor(white) lstyle(none) lcolor(white))
graph export "figa3a.pdf" , replace
use "Gallup US Migration Levels.dta", clear
graph bar dissatisfiedwantincrease dissatisfiedremainsame dissatisfiedwantdecrease, over( year, label(labsize(small))) intensity(*.8) ylabel(, angle(horizontal) nogrid)  legend(region(lcolor(white)) rows(1) size(large) order(1 "Want Increase " 2 " Remain Same " 3 "Want Decrease")) plotregion(fcolor(white)  lcolor(white)  lstyle(none)) plotregion(fcolor(white) lstyle(none) lcolor(white)) graphregion(fcolor(white) lstyle(none) lcolor(white)) 
graph export "figa3b.pdf" , replace


**Figure A4: Citizen Attitudes toward Italian and Turkish Immigrants in West Germany (1982)
use "German_PubOpinion.dta", clear
graph hbar turks italians  if negative !=".", over(attitude_resp, sort(turks) label(labsize(medium) nogrid) descending )  blabel(bar, format(%4.0f)  size(medium)) ylabel(,nogrid) legend(row(1) label(1 "Turks") label( 2 "Italians") lstyle(none) lcolor(white) fcolor(white) region(lwidth(none)) )  plotregion(fcolor(white) lstyle(none) lcolor(white)) graphregion(fcolor(white) lstyle(none) lcolor(white)) 
graph export "figa4.pdf" , replace


**Table A6: G5 Migration and IMF Program Participation
use "Main Data.dta", clear
xtlogit f1.IMF_program g5composite_pop_1000 growth  polity loggdp logpop logg5imports logg5exports g5alliance i.year if year>1977, re 
estimates store MODELA7, title ((A7))
logit f1.IMF_program g5composite_pop_1000 growth  polity loggdp logpop logg5imports logg5exports g5alliance c.year i.period  i.ccode if year>1977, vce(cluster ccode)
estimates store MODELA8, title ((A8))
logit f1.IMF_program g5composite_pop_1000 growth  polity loggdp logpop logg5imports logg5exports g5alliance g5aid c.year i.period i.ccode if year>1977, vce(cluster ccode)
estimates store MODELA9, title ((A9))
logit f1.IMF_program g5composite_pop_1000 growth  polity loggdp logpop logg5imports logg5exports g5alliance logremit c.year i.period i.ccode if year>1977, vce(cluster ccode)
estimates store MODELA10, title ((A10))
logit f1.IMF_program g5composite_pop_1000 growth  polity loggdp logpop logg5imports logg5exports g5alliance crisis_bank crisis_currency crisis_systemic crisis_inflation c.year i.period i.ccode if year>1977, vce(cluster ccode)
estimates store MODELA11, title ((A11))
estout MODELA7 MODELA8 MODELA9 MODELA10 MODELA11, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea6.tex", replace style(tex)


**Table A7: Predictors of IMF Program Entry (1980-2013)
probit IMF_program c.imfprogram_avg#c.imf_liquidity_ratio c.imfprogram_avg l.lngdppc l.ln_forex l.growth l.ca_gdp l.govcon_gdp l.xr_level l.unsc l.PctAgreeUS l.g5alliance l.logg5exports i.year i.region, vce(cluster ccode)
estimates store MODELA12, title((A12))
estout MODELA12, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "tablea7.tex", replace style(tex)


**Figure A5: Receiving Operating Characteristic (ROC) Curve 
lroc IMF_program // AUC
estat class, cutoff(0.5) //% Correctly Predicted
graph export "figa5.pdf" , replace

**Table A8: Heckman Model of IMF Loan Size (1980-2013)
heckman loansizelog c.l.g5composite_pop_1000##c.l.growth l.polity l.logpop l.loggdp i.year i.ccode, select(c.imfprogram_avg#c.imf_liquidity_ratio c.imfprogram_avg l.lngdppc l.ln_forex l.growth l.ca_gdp l.govcon_gdp l.xr_level l.unsc l.PctAgreeUS l.g5alliance i.year i.region) vce(cluster ccode)
estimates store MODELA13, title((A13))
heckman loansizelog c.l.g5composite_pop_1000##c.l.growth l.polity l.logpop l.loggdp i.year i.ccode, select(c.imfprogram_avg#c.imf_liquidity_ratio c.imfprogram_avg l.lngdppc l.growth l.ln_forex l.ca_gdp l.govcon_gdp l.xr_level l.unsc l.PctAgreeUS l.g5alliance l.logg5exports i.year i.region) vce(cluster ccode)
estimates store MODELA14, title((A14))
estout MODELA13 MODELA14, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "tablea8.tex", replace style(tex)


**Table A9: G5 Migration, Growth, and IMF Conditionality
nbreg f1.conditionsnum c.g5composite_pop_1000##c.growth logpop loggdp polity logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODELA15, title((A15))
nbreg f1.hard c.g5composite_pop_1000##c.growth logpop loggdp polity logg5imports logg5exports g5alliance year i.period  i.ccode, vce(cluster ccode) noconstant
estimates store MODELA16, title((A16))
nbreg f1.soft c.g5composite_pop_1000##c.growth logpop loggdp polity logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODELA17, title((A17))
nbreg f1.qpc c.g5composite_pop_1000##c.growth logpop loggdp  polity  logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODELA18, title((A18))
nbreg f1.spc c.g5composite_pop_1000##c.growth logpop loggdp polity  logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODELA19, title((A19))
estout MODELA15 MODELA16 MODELA17 MODELA18 MODELA19, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea9.tex", replace style(tex)


**Table A10: G5 Migration and Other Types of IMF Conditionality
nbreg f1.fiscal c.g5composite_pop_1000 growth logpop loggdp polity logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODELA20, title((A20))
nbreg f1.debt c.g5composite_pop_1000 c.growth logpop loggdp polity logg5imports logg5exports g5alliance year i.period  i.ccode, vce(cluster ccode) noconstant
estimates store MODELA21, title((A21))
nbreg f1.poverty c.g5composite_pop_1000 c.growth logpop loggdp  polity  logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODELA22, title((A22))
nbreg f1.social c.g5composite_pop_1000 c.growth logpop loggdp polity  logg5imports logg5exports g5alliance year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODELA23, title((A23))
nbreg f1.waiver c.g5composite_pop_1000 c.growth logpop loggdp polity  logg5imports logg5exports g5alliance f1.conditionsnum year i.period i.ccode, vce(cluster ccode) noconstant
estimates store MODELA24, title((A24))
estout MODELA20 MODELA21 MODELA22 MODELA23 MODELA24, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea10.tex", replace style(tex)


**Table A11: Loan Size, Conditionality, and Emigration Rate (Total)
qui fracreg probit f1.tot_rate loansizelog labor fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA25, title((A25))
qui fracreg probit f2.tot_rate loansizelog labor fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA26, title((A26))
qui fracreg probit f1.tot_rate loansizelog soft hard growth logpop loggdp polity  i.year i.ccode, vce(cluster ccode)
estimates store MODELA27, title((A27))
qui fracreg probit f2.tot_rate loansizelog soft hard growth logpop loggdp polity  i.year i.ccode, vce(cluster ccode)
estimates store MODELA28, title((A28))
qui fracreg probit f1.tot_rate loansizelog qpc spc growth logpop loggdp  polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA29, title((A29))
qui fracreg probit f2.tot_rate loansizelog qpc spc growth logpop loggdp  polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA30, title((A30))
estout MODELA25 MODELA26 MODELA27 MODELA28 MODELA29 MODELA30, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea11.tex", replace style(tex)


**Table A12: Loan Size, Conditionality, and Emigration Rate (Low-Skilled)
qui fracreg probit f1.low_rate loansizelog labor fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA31, title((A31))
qui fracreg probit f2.low_rate loansizelog labor fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA32, title((A32))
qui fracreg probit f1.low_rate loansizelog soft hard growth logpop loggdp polity  i.year i.ccode, vce(cluster ccode)
estimates store MODELA33, title((A33))
qui fracreg probit f2.low_rate loansizelog soft hard growth logpop loggdp polity  i.year i.ccode, vce(cluster ccode)
estimates store MODELA34, title((A34))
qui fracreg probit f1.low_rate loansizelog qpc spc growth logpop loggdp  polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA35, title((A35))
qui fracreg probit f2.low_rate loansizelog qpc spc growth logpop loggdp  polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA36, title((A36))
estout MODELA31 MODELA32 MODELA33 MODELA34 MODELA35 MODELA36, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea12.tex", replace style(tex)


**Table A13: Loan Size, Conditionality, and Emigration Rate (Medium-Skilled)
qui fracreg probit f1.med_rate loansizelog labor fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA37, title((A37))
qui fracreg probit f2.med_rate loansizelog labor fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA38, title((A38))
qui fracreg probit f1.med_rate loansizelog soft hard growth logpop loggdp polity  i.year i.ccode, vce(cluster ccode)
estimates store MODELA39, title((A39))
qui fracreg probit f2.med_rate loansizelog soft hard growth logpop loggdp polity  i.year i.ccode, vce(cluster ccode)
estimates store MODELA40, title((A40))
qui fracreg probit f1.med_rate loansizelog qpc spc growth logpop loggdp  polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA41, title((A41))
qui fracreg probit f2.med_rate loansizelog qpc spc growth logpop loggdp  polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA42, title((A42))
estout  MODELA37 MODELA38 MODELA39 MODELA40 MODELA41 MODELA42, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea13.tex", replace style(tex)


**Table A14: Loan Size, Conditionality, and Emigration Rate (High-Skilled)
qui fracreg probit f1.high_rate loansizelog labor fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA43, title((A43))
qui fracreg probit f2.high_rate loansizelog labor fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA44, title((A44))
qui fracreg probit f1.high_rate loansizelog soft hard growth logpop loggdp polity  i.year i.ccode, vce(cluster ccode)
estimates store MODELA45, title((A45))
qui fracreg probit f2.high_rate loansizelog soft hard growth logpop loggdp polity  i.year i.ccode, vce(cluster ccode)
estimates store MODELA46, title((A46))
qui fracreg probit f1.high_rate loansizelog qpc spc growth logpop loggdp  polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA47, title((A47))
qui fracreg probit f2.high_rate loansizelog qpc spc growth logpop loggdp  polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA48, title((A48))
estout MODELA43 MODELA44 MODELA45 MODELA46 MODELA47 MODELA48, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea14.tex", replace style(tex)


**Table A15: Loan Size, Labor Conditionality, and Emigration Rate
qui fracreg probit f1.tot_rate loansizelog labor_private labor_public fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA49, title((A49))
qui fracreg probit f2.tot_rate loansizelog labor_private labor_public fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA50, title((A50))
qui fracreg probit f1.low_rate loansizelog labor_private labor_public fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA51, title((A51))
qui fracreg probit f2.low_rate loansizelog labor_private labor_public fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA52, title((A52))
estout MODELA49 MODELA50 MODELA51 MODELA52, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea15.tex", replace style(tex)


**Table A16: Loan Size, Labor Conditionality, and Emigration Rate
qui fracreg probit f1.med_rate loansizelog labor_private labor_public fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA53, title((A53))
qui fracreg probit f2.med_rate loansizelog labor_private labor_public fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA54, title((A54))
qui fracreg probit f1.high_rate loansizelog labor_private labor_public fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA55, title((A55))
qui fracreg probit f2.high_rate loansizelog labor_private labor_public fiscal debt poverty social waiver growth logpop loggdp polity i.year i.ccode, vce(cluster ccode)
estimates store MODELA56, title((A56))
estout MODELA53 MODELA54 MODELA55 MODELA56, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea16.tex", replace style(tex)


**Table A17: Mediation Analysis
use "Mediation.dta", clear
sem (g5composite_pop_1000 <- g5composite_pop_1000_1960)(f.loansizelog <- g5composite_pop_1000 g5composite_pop_1000_1960 growth g5composite_pop_1000xgrowth logpop loggdp polity), vce(cluster ccode)
estimates store MODELA57, title((A57))
estout MODELA57, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_clust r2_p, fmt(0 0 3) label(Observations Countries PseudoR$^2$)) label,  using "tablea17.tex", replace style(tex)
